
export function randomString() {
    return Math.random().toString(36).substring(2);
}

export function randomName() {
    const names = [
        // 哺乳动物
        "Dog", "Cat", "Rabbit", "Horse", "Bear", "Lion", "Tiger", "Monkey",
        "Kangaroo", "Koala", "Panda", "Fox", "Wolf", "Deer", "Elephant",
        "Giraffe", "Kitten", "Puppy", "Hamster", "Squirrel",
        // 鸟类
        "Eagle", "Owl", "Dove", "Sparrow", "Peacock", "Penguin", "Hawk",
        "Ostrich", "Parrot",
        // 爬行动物
        "Snake", "Lizard", "Turtle", "Crocodile",
        // 两栖动物
        "Frog", "Toad",
        // 鱼类和海洋生物
        "Dolphin", "Shark", "Seal", "Whale", "Octopus", "Starfish",
        "Jellyfish", "Shrimp", "Crab",
        // 昆虫类
        "Butterfly", "Bee", "Ant", "Ladybug", "Dragonfly"
    ];
    const index = Math.floor(Math.random() * names.length);
    const name = names[index].toLowerCase();
    return `${name}`;
}

export function chattingList(user) {
    return [
        {
            user: user,
            relId: "1",
            showName: '小公主',
            peerUserId: "chid_0376ad0ee5ff",
            avatarUrl:'https://picsum.photos/200/200?random=1',
            online: true,
            lastTime: '2024-05-05 14:30',
            lastTip: '哈哈，你好啊',
            unreadCount: 5,
            messages: [],
            isGroup: false
        },
        {
            user: user,
            relId: "2",
            peerUserId: "chid_0e47fb7ebe13",
            showName: '小王子',
            avatarUrl:'https://picsum.photos/200/200?random=2',
            online: true,
            lastTime: '2024-05-06 14:30',
            lastTip: '明天开会讨论新方案',
            unreadCount: 5,
            messages: [],
            isGroup: false
        },
    ]
}